/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Administrator
 * Date: 2023-03-20
 * Time: 21:11
 */
class Draw{
    public void draw(){
        System.out.println("画图形");
    }
}
class Flower extends Draw{
    @Override
    public void draw(){
        System.out.println("❀");
    }
}
class Rect extends Draw{
    @Override
    public void draw(){
        System.out.println("画矩形");
    }
}
class Round extends Rect{
    @Override
    public void draw(){
        System.out.println("○");
    }
}


public class Test1 {
    public static void drawmap(Draw a){
        a.draw();
    }

    public static void main(String[] args) {
        Draw[] draws = {new Flower(),new Rect(),new Round(),new Draw()};
        for(Draw draw:draws){
            draw.draw();
        }


    }
}
